home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
midi
/
midifl12.lha
/
midifile.new
/
noteon.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-08-27
|
1KB
|
76 lines
#include <stdio.h>
#include <ctype.h>
#include "midifile.h"
FILE *F;
extern long Mf_currtime;
/* mygetc : returns <int> with input variables:
* void:
*/
int mygetc (void)
{
return (getc (F));
}
/* ------------------------------------------------------------------------ */
/* mynoteon : returns <int> with input variables:
* chan:
* note:
* velocity:
*/
int mynoteon (
int chan,
int note,
int velocity)
{
printf ("On: %ld: chan=%d, note=%d, velocity=%d\n", Mf_currtime, chan, note, velocity);
}
/* ------------------------------------------------------------------------ */
/* mynoteoff : returns <int> with input variables:
* chan:
* note:
* velocity:
*/
int mynoteoff (
int chan,
int note,
int velocity)
{
printf ("Off: %ld: chan=%d, note=%d, velocity=%d\n", Mf_currtime, chan, note, velocity);
}
/* ------------------------------------------------------------------------ */
/* main : returns <int> with input variables:
* argc:
* argv:
*/
int main (
int argc,
char **argv)
{
if (argc > 1)
F = fopen (argv[1], "r");
else
F = stdin;
Mf_getc = mygetc;
Mf_noteon = mynoteon;
Mf_noteoff = mynoteoff;
midifile ();
exit (0);
}
/* ------------------------------------------------------------------------ */